unit JvPlgIntf;
  {$weakpackageunit on}
// holding interfaces for plugins and main application
// remember to always produce unique GUIDs (Ctrl+Shift+G) - never reuse them after changes

interface

uses
  Windows, Classes,Vcl.Forms;

// A common interface for all plugins
type
  TFrameClass = class of TFrame;
  IMyMainAppInterface = interface;
  IMyPluginInterface = interface
['{4E09D8A6-EB91-4249-9107-90AE61E1705D}']

    procedure ShowPlug(Sender: TObject);
    function CloseForm(Sender: TObject):Boolean;


    procedure ShowPlugName(Sender: TObject;FormName:string);
    function GetForm(Sender: TObject;FormName:string):TForm;

    procedure Init(const MainApp:IMyMainAppInterface;HostScreen:TScreen);

    function GetClassForm(FormName:string):TFormClass;

    procedure GetShowModal(FormName:string);

    function GetFormNum:Integer;

  end;

  // if plugins shall be able to access the mainapplication,
  //   an interface for the main application should be defined as well
  IMyMainAppInterface = interface
['{B3B66901-5A8E-43DD-BEA3-ACDC7D77FC26}']
    procedure DoSomethingSpecial(Name: string; OnClick: TNotifyEvent);

    // this way properties can be used:
     function GetPosition : TPoint;
     procedure SetPosition(const NewPos : TPoint);
     property Position : TPoint read GetPosition write SetPosition;

     procedure ClosePage;
  end;


implementation

end.
